//
//  UIView+FirstViewController.m
//  Xiu
//
//  Created by mayanwei on 14-10-8.
//  Copyright (c) 2014年 CC. All rights reserved.
//

#import "UIView+FirstViewController.h"

@implementation UIView (FirstViewController)

- (UIViewController *)traverseResponderChainForUIViewController
{
    id nextResponder = [self nextResponder];
    if ([nextResponder isKindOfClass:[UIViewController class]]) {
        return nextResponder;
    } else if ([nextResponder isKindOfClass:[UIView class]]) {
        return [nextResponder traverseResponderChainForUIViewController];
    } else {
        return nil;
    }
}

@end
